import { dataSource } from './orm';

import { UserEntity } from '../entity/user.entity';
import { CompanyEntity } from '../entity/company.entity';
import { PositionEntity } from '../entity/position.entity';
import { ResumeEntity } from '../entity/resume.entity';
import { ResumeDeliveryEntity } from '../entity/resume-delivery.entity';

const userRepository = dataSource.getRepository(UserEntity);
const companyRepository = dataSource.getRepository(CompanyEntity);
const positionRepository = dataSource.getRepository(PositionEntity);
const resumeRepository = dataSource.getRepository(ResumeEntity);
const resumeDeliveryRepository = dataSource.getRepository(ResumeDeliveryEntity);

export { userRepository, companyRepository, positionRepository, resumeRepository, resumeDeliveryRepository };

export { UserEntity, CompanyEntity, PositionEntity, ResumeEntity, ResumeDeliveryEntity };
